﻿@using ORM.Business.Models.Entities
@using ORM.Helpers
@model ORM.ViewModels.Guides.GuideDetailsViewModel
@{
    ViewBag.Title = "Chi Tiết";
}
@if (Model == null || Model.Guide == null)
{
    <table class="contentBox" width="100%">
        <tr>
            <th class="boxTitle">
                Hướng Dẫn
            </th>
        </tr>
        <tr>
            <td style="vertical-align: top;">
                <p>
                    Bài hướng dẫn không tồn tại hoặc đã bị xoá.</p>
            </td>
        </tr>
    </table>
}
else
{
    <table width="100%" style="padding: 0px">
        <colgroup>
            <col span="1" style="width: 76%;" />
            <col span="1" style="width: 22%;" />
        </colgroup>
        <tr>
            <td style="vertical-align: top; padding: 3px; padding-top: 0px">
                <table class="contentBox" width="100%">
                    <tr>
                        <th class="boxTitle">
                            Hướng Dẫn
                        </th>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; padding: 10px">
                            <br />
                            @if (Model == null)
                            {
                                <p>
                                    Bài hướng dẫn không tồn tại hoặc đã bị xoá.</p>
                            }
                            else
                            {
                                <p style="font-weight: bold; font-size: 25px">@Model.Guide.Title
                                </p>
                                <table width="100%">
                                    <tr>
                                        <td style="text-align: left; vertical-align: bottom">
                                            Loại hướng dẫn: @Model.Guide.GuideType.Name
                                        </td>
                                        <td style="text-align: right">
                                            <a class="titleLink" href="/Account/Details/@Model.Guide.PostedBy">
                                                <img src="@Url.UserAvatar(Model.Guide.PostedByUser, ORM.Models.ImageType.Big)" alt="Ảnh đại diện" class="big-imgavatar" height="30px" width="30px" /></a>
                                            <a class="titleLink" href="/Account/Details/@Model.Guide.PostedBy">@Model.Guide.PostedByUser.Username</a>
                                            tạo lúc @Model.Guide.PostedDate.ToString("HH:mm") ngày @Model.Guide.PostedDate.ToString("dd-MM-yyyy")
                                        </td>
                                    </tr>
                                </table>
                                <hr />
                                <table width="100%">
                                    <tr>
                                        <td style="text-align: left">
                                            <table>
                                                <tr>
                                                    <td style="padding-right: 15px">
                                                        <table>
                                                            <td style="padding: 0px">
                                                                <img src="/Content/Images/thumb-up (1).ico" style="width: 20px; height: 20px" />
                                                            </td>
                                                            <td style="padding: 0px">
                                                                x <span id="guidePoint">@Model.Guide.UpVotes</span>
                                                            </td>
                                                        </table>
                                                    </td>
                                                    <td style="padding-right: 15px">
                                                        <table>
                                                            <td style="padding: 0px">
                                                                <img src="/Content/Images/Places-favorites.ico" style="width: 20px; height: 20px" />
                                                            </td>
                                                            <td style="padding: 0px">
                                                                x <span id="guideBookmark">@ViewBag.BookmarkTotal</span>
                                                            </td>
                                                        </table>
                                                    </td>
                                                    <td style="padding-right: 15px">
                                                        <table>
                                                            <td style="padding: 0px">
                                                                <img src="/Content/Images/search (1).ico" style="width: 20px; height: 20px" />
                                                            </td>
                                                            <td style="padding: 0px">
                                                                x @Model.Guide.Views
                                                            </td>
                                                        </table>
                                                    </td>
                                                    <td style="padding-right: 15px">
                                                        <table>
                                                            <td style="padding: 0px">
                                                                <img src="/Content/Images/comment (1).ico" style="width: 20px; height: 20px" />
                                                            </td>
                                                            <td style="padding: 0px">
                                                                x <span id="guideComment">@Model.Guide.Comments</span>
                                                            </td>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td style="text-align: right">
                                            <table style="float: right">
                                                <tr>
                                                    @if (ViewBag.CurrentUserId != 0)
                                                    {
                                                        if (ViewBag.CurrentUserId == Model.Guide.PostedBy)
                                                        {

                                                            if (Model.Guide.IsAddedBookmarkByCurrentUser)
                                                            {
                                                        <td>
                                                            <span class="titleLink" onclick="AddBookmarkAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/favorite-remove.ico" id="addBookmarkGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="GuideBookMarkText">Xoá khỏi sổ tay</span> </span>
                                                        </td>

                                                            }
                                                            else
                                                            {
                                                        <td>
                                                            <span href="" class="titleLink" onclick="AddBookmarkAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Actions-bookmark-add.ico" id="addBookmarkGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="GuideBookMarkText">Thêm vào sổ tay</span> </span>
                                                        </td>
                                                            }
                                                        <td>
                                                            <a href="/Guide/Edit?Id=@Model.Guide.Id" class="titleLink" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/edit.ico" width="20px" height="20px" alt="" />Sửa bài</a>
                                                        </td>
                                                        <td>
                                                            <span href="" class="titleLink" onclick="DeleteGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Delete.ico" style="width: 20px; height: 20px;" />
                                                                Xoá bài</span>
                                                        </td>
                                                        }
                                                        else
                                                        {
                                                            if (Model.Guide.IsVotedByCurrentUser)
                                                            {
                                                        <td>
                                                            <span href="" class="titleLink" onclick="PlusPointForAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Action-arrow-blue-down.ico" id="guidePointImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="VoteGuideText">Bỏ thích</span> </span>
                                                        </td>
                                                            }
                                                            else
                                                            {
                                                        <td>
                                                            <span href="" class="titleLink" onclick="PlusPointForAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Action-arrow-blue-up.ico" id="guidePointImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="VoteGuideText">Thích</span> </span>
                                                        </td>
                                                            }
                                                            if (Model.Guide.IsAddedBookmarkByCurrentUser)
                                                            {
                                                        <td>
                                                            <span class="titleLink" onclick="AddBookmarkAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/favorite-remove.ico" id="addBookmarkGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="GuideBookMarkText">Xoá khỏi sổ tay</span> </span>
                                                        </td>

                                                            }
                                                            else
                                                            {
                                                        <td>
                                                            <span href="" class="titleLink" onclick="AddBookmarkAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Actions-bookmark-add.ico" id="addBookmarkGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="GuideBookMarkText">Thêm vào sổ tay</span> </span>
                                                        </td>
                                                            }
                                                            if (Model.Guide.IsReportedByCurrentUser)
                                                            {
                                                        <td>
                                                            <span class="titleLink" onclick="ReportAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Red-Warning.ico" id="reportGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="ReportGuideText">Huỷ báo cáo</span> </span>
                                                        </td>
                                                            }
                                                            else
                                                            {
                                                        <td>
                                                            <span class="titleLink" onclick="ReportAnGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Alert.ico" id="reportGuideImage @Model.Guide.Id" style="width: 20px; height: 20px;"/>
                                                                <span id="ReportGuideText">Báo cáo</span> </span>
                                                        </td>
                                                            }
                                                            if (User.IsInRole("Admin"))
                                                            {
                                                        <td>
                                                            <span href="" class="titleLink" onclick="DeleteGuide('@Model.Guide.Id')" style="cursor: pointer; color: #034af3">
                                                                <img src="/Content/Images/Delete.ico" style="width: 20px; height: 20px;" />
                                                                Xoá bài</span>
                                                        </td>
                                                            }
                                                        }
                                                    }
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <hr />             
                                <div style="font-size: 11; color: lightslategray; padding-top: 5px">@Model.Guide.TitleSearch</div>
                                <br />
                                @Html.Raw(Model.Guide.ContentHtml)  
                                <br />
                                <hr />
                                                    if (Model.Guide.LastUpdate != null)
                                                    {
                                <div style="text-align: right">
                                    Sửa lần cuối bởi <a class="titleLink" href="/Account/Details/@Model.Guide.UpdatedBy">@ViewBag.UpdatedByName</a>
                                    lúc @Convert.ToDateTime(Model.Guide.LastUpdate).ToString("HH:mm") ngày @Convert.ToDateTime(Model.Guide.LastUpdate).ToString("dd/MM/yyyy")
                                </div>
                                                    }                                        
                                <br />
                                <h3>Bình Luận:</h3>
                                <br />

                                <div id="commentTabs" class="css-tabs" style="width: 100%; vertical-align: bottom;
                                    height: 33px; display: inline-block; padding-top: 15px">
                                    <ul class="menu" id="tabsfullbox" style="height: 100%; width: 100%">
                                        <li id="tabComment-2"><a href="#tabComment-2" id="tabComment2" onclick="loadCommentTab(2)">
                                            Mới Nhất</a> </li>
                                        <li id="tabComment-1"><a href="#tabComment-1" id="tabComment1" onclick="loadCommentTab(1)">
                                            Được Thích Nhiều Nhất</a> </li>
                                    </ul>
                                </div>
                                <div style="width: 100%; border-top: solid 1px #808080; padding-top: 10px">
                                    <br />
                                    <div class="tabsfullcontent" id="tabCommentContent-1">
                                    </div>
                                    <div class="tabsfullcontent" id="tabCommentContent-2">
                                    </div>
                                </div>


                                <div style="width: 100%; border-top: solid 1px #808080; padding-top: 10px">
                                    <div class="tabsfullcontent" id="tabCommentContent-1">
                                    </div>
                                    <div class="tabsfullcontent" id="tabCommentContent-2">
                                    </div>
                                </div>
                                <br />
                
                                                    if (ViewBag.CurrentUserId != 0)
                                                    {
                                <h3>
                                    <img src="/Content/Images/Comment-Add (1).ico" width="30px" height="30px" /> Thêm vào bình luận của bạn:
                                </h3>
                                <br />
                                @Html.Partial("CommentInputForm", new GuideComment { GuideId = Model.Guide.Id })
                                                    }
                                @Html.Hidden("SelectedCommentTab", 1)
                                @Html.Hidden("SelectedCommentPage", 1)
                                @Html.Hidden("NumberOfCommentOnPage", 1)            
                                <script type="text/javascript">
    function loadCommentTab(index) {
        $("#SelectedCommentTab").val(index);
        $("#SelectedCommentPage").val(1);
        //Set lai bottomBorder cho cac tab
        for (var i = 1; i <=2; i++) {
            var divId = "tabCommentContent-" + i;
            var divElement = document.getElementById(divId);
            var tabId = "tabComment" + i;
            var myTab = document.getElementById(tabId);
            if (i != index) {
                divElement.style.display = "none";
                myTab.style.borderBottom = "1px solid #808080";
            } else {
                divElement.style.display = "block";
                myTab.style.borderBottom = "solid 1px white";
            }
        }

        var targetDiv = "tabCommentContent-" + index;

        //set url and data to send
        var url;
        var condition;
        var guideId = @Model.Guide.Id;
        if (index == 1) {
            condition = "highScore";
        } else if (index == 2) {
            condition = "new";
        } 
        url = "/Guide/GetCommentList?guideId=" + guideId + "&condition=" + condition;
        $.get(url, function(result) {
            document.getElementById(targetDiv).innerHTML = result;
        });
    }
    function DeleteGuide(guideId) {
                $(document.createElement('div'))
        .attr({title: 'Fixtech.vn', 'class': 'alert'})
        .html("Bạn có chắc chắn muốn xoá bài hướng dẫn này?")
        .dialog({
            buttons: {"Xác Nhận": function() {
                        $.ajax({
            type: "POST",
            url: "@Url.Action("Delete", "Guide")",
            dataType: "json",
            data: {
                id: guideId
            },
            success: function(data) {
                if (data) {
                    alert(data);
                } else {
                    $(document.createElement('div'))
        .attr({title: 'Fixtech.vn', 'class': 'alert'})
        .html("Xoá bài thành công!")
        .dialog({
            buttons: {OK: function() {
                window.location.href = "/Guide/Index";
                $(this).dialog('close');
                
            }},
            close: function() {   
                window.location.href = "/Guide/Index";
                $(this).remove();
                
            },
            draggable: true,
            modal: true,
            resizable: false,
            width: 500,
            open: function(event, ui) {
        $("button").blur();
    }
        });
                    
                }

            },
            error: function(result, error) {
                alert(" Can't do because: " + error.responseText);
            },

            complete: function() {
            }
        });
                $(this).dialog('close');
            }, "Huỷ": function(){$(this).dialog('close');}},
            close: function(){$(this).remove();},
            draggable: true,
            modal: true,
            resizable: false,
            width: 500,
            open: function(event, ui) {
        $("button").blur();
    }
});

    }

    $(document).ready(function() {

        $('#tabcommentfullbox').tabs();

        $(document).ready(function() {
            $("#tabcommentfullbox").tabs();
            loadCommentTab(2);
        });
        $("#tabcomment1").click(function(e) {
            e.preventDefault();
            loadCommentTab(1);
        });
        $("#tabcomment2").click(function(e) {
            e.preventDefault();
            loadCommentTab(2);

        });
        


    });
                                </script>



                                <script type="text/javascript">
        function PlusPointForAnGuide(guideId){
        var pointElementName = 'guidePoint';
        var imageElementName = 'guidePointImage ' + guideId;
        $.ajax({
            type: "POST",
            url: "@Url.Action("PlusPointForAnGuide", "Guide")",
            dataType: "json",
            data: {
                GuideId: guideId
            },
            success: function(data) {
                if (data.message) {
                    alert(data.message);
                } else {
                    document.getElementById(pointElementName).innerHTML = data.newPoint;
                    var currentImage = document.getElementById(imageElementName).getAttribute('src');
                    if(currentImage == "/Content/Images/Action-arrow-blue-up.ico") {
                        document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Action-arrow-blue-down.ico');
                        document.getElementById("VoteGuideText").innerHTML = "Bỏ thích";
                    }
                    else {
                     document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Action-arrow-blue-up.ico');
                     document.getElementById("VoteGuideText").innerHTML = "Thích";
                    }
                }
            },
            error: function(result, error) {
                alert(" Can't do because: " + error.responseText);
            },

            complete: function() {
            }
        });
    };
    

    function ReportAnGuide(guideId){
        if(@ViewBag.CurrentUserId == 0) {
            alert("Bạn phải đăng nhập để thực hiện chức năng này");
            return;
        }
        var imageElementName = 'reportGuideImage ' + guideId;
        var currentImage = document.getElementById(imageElementName).getAttribute('src');
        if(currentImage == "/Content/Images/Red-Warning.ico") {
             $(document.createElement('div'))
        .attr({title: 'Fixtech.vn', 'class': 'alert'})
        .html("Bạn muốn huỷ báo cáo sai phạm bài viết này?")
        .dialog({
            buttons: {"Xác Nhận": function() {
                                $.ajax({
            type: "POST",
            url: "@Url.Action("ReportAnGuide", "Guide")",
            dataType: "json",
            data: {
                GuideId: guideId
            },
            success: function(data) {
                if (data.message) {
                    alert(data.message);
                } else {
                    
                    
                    if(currentImage == "/Content/Images/Red-Warning.ico") {
                        document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Alert.ico');
                        document.getElementById("ReportGuideText").innerHTML = "Báo cáo";
                    }
                    else {
                     document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Red-Warning.ico');
                     document.getElementById("ReportGuideText").innerHTML = "Huỷ báo cáo";
                    }
                }
            },
            error: function(result, error) {
                alert(" Can't do because: " + error.responseText);
            },

            complete: function() {
            }
        });
                $(this).dialog('close');
            }, "Huỷ": function(){$(this).dialog('close');}},
            close: function(){$(this).remove();},
            draggable: true,
            modal: true,
            resizable: false,
            width: 500,
            open: function(event, ui) {
        $("button").blur();
    }
        });
        } else {
            $(document.createElement('div'))
        .attr({title: 'Fixtech.vn', 'class': 'alert'})
        .html("<div>Lý do bạn muốn báo cáo sai phạm bài hướng dẫn này là:<br/><br/><input type=text id=txtGuideReport style='width:400px'/><br/><div id=inputMessage style='color:red; font-size:14px'></div></div>")
        .dialog({
            buttons: {"Xác Nhận": function() {
                var reason = $("#txtGuideReport").val().trim();
                if(reason != "") {
                    $.ajax({
                type: "POST",
                url: "@Url.Action("ReportAnGuide", "Guide")",
                dataType: "json",
                data: {
                    GuideId: guideId,
                    Reason: reason
                },
                success: function(data) {
                    if (data.message) {
                        alert(data.message);
                    } else {
                        
                    alert("Báo cáo hoàn tất!<br/>Ban quản trị sẽ xử lý thông tin trong thời gian sớm nhất.");
                        document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Red-Warning.ico');
                        document.getElementById("ReportGuideText").innerHTML = "Huỷ báo cáo";
                    }

//                        var firstli = $('.comment-list li').first();
//                        $(firstli).show(200, function(){$(this).fadeTo(300,1)});

//                        if(data != "") {
//                            var total = parseInt($("#totalQuestion").html());
//                            $("#totalQuestion").html(total + 1);
//                        }
                },
                error: function(result, error) {
                    alert(" Can't do because: " + error.responseText);
                },

                complete: function() {
//                        isPosting = false;
                }
            });
                    $(this).dialog('close');
                } else {
                    document.getElementById("inputMessage").innerHTML = "Lý do sai phạm không thể để trống!";    
                }
                
            }, "Huỷ": function(){$(this).dialog('close');}},
            close: function(){$(this).remove();},
            draggable: true,
            modal: true,
            resizable: false,
            width: 500,
            open: function(event, ui) {
        $("button").blur();
    }
});
            
        }
        
       
    };

     function AddBookmarkAnGuide(guideId){
        if(@ViewBag.CurrentUserId == 0) {
            alert("Bạn phải đăng nhập để thực hiện chức năng này");
            return;
        }
            var imageElementName = 'addBookmarkGuideImage ' + guideId;
            $.ajax({
                type: "POST",
                url: "@Url.Action("AddBookmarkAnGuide", "Guide")",
                dataType: "json",
                data: {
                    GuideId: guideId,
                },
                success: function(data) {
                    if (data.message) {
                        alert(data.message);
                    } else {
                        var currentImage = document.getElementById(imageElementName).getAttribute('src');
                    
                        if(currentImage == "/Content/Images/favorite-remove.ico") {
                            document.getElementById(imageElementName).setAttribute('src', '/Content/Images/Actions-bookmark-add.ico');
                            document.getElementById("GuideBookMarkText").innerHTML = "Thêm vào sổ tay";
                        }
                        else {
                            document.getElementById(imageElementName).setAttribute('src', '/Content/Images/favorite-remove.ico');
                            document.getElementById("GuideBookMarkText").innerHTML = "Xoá khỏi sổ tay";
                        }
                        document.getElementById("guideBookmark").innerHTML = data.newBookmark;
                    }

//                        var firstli = $('.comment-list li').first();
//                        $(firstli).show(200, function(){$(this).fadeTo(300,1)});

//                        if(data != "") {
//                            var total = parseInt($("#totalQuestion").html());
//                            $("#totalQuestion").html(total + 1);
//                        }
                },
                error: function(result, error) {
                    alert(" Can't do because: " + error.responseText);
                },

                complete: function() {
//                        isPosting = false;
                }
            });
       
    };

                                </script>
                            }
                        </td>
                    </tr>
                </table>
            </td>
            <td style="vertical-align: top; padding: 0px">
                @*<div class="roundedField" style="width: 100%;background-color: gainsboro; padding: 10px">
                <b style="font-size: 15px">@Model.Guide.Model.Guide.Name</b>
                <br/> <br/>
                <center>
                   
                    <img src="@Url.ModelAvatar(Model.Guide.Model, ORM.Models.ImageType.Big)" alt="Ảnh đại diện" class="big-imgavatar" width="150px" /><br/>
                </center> <br/>
                <div style="font-size: 13px">
                @Model.Guide.Model.Guide.Description
                </div>
            </div>*@
                <table width="100%" class="contentBox">
                    <tr>
                        <th class="boxTitle">
                            <b style="font-size: 15px">@Model.Guide.Model.Name</b>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <center>
                                <img src="@Url.ModelAvatar(Model.Guide.Model, ORM.Models.ImageType.Big)" alt="@Model.Guide.Model.Name" class="big-imgavatar" width="180px" /><br />
                            </center>
                            <br />
                            <div style="font-size: 13px; color: gray">
                                @Model.Guide.Model.Description
                            </div>
                            <table style="padding-left: 5px">
                                <tr>
                                    <td>
                                        <img src="/Content/Images/preferences-system.ico" width="20px" height="20px" />
                                    </td>
                                    <td style="padding: 0px">
                                        <a class="titleLink" href="/Guide/Index?deviceId=@Model.Guide.Model.Device.Id&manufacturerId=@Model.Guide.Model.Manufacturer.Id&modelId=@Model.Guide.ModelID" title="Xem tất cả các bài hướng dẫn cho @Model.Guide.Model.Device.Name @Model.Guide.Model.Manufacturer.Name @Model.Guide.Model.Name">@ViewBag.NumberOfGuides
                                            hướng dẫn</a>
                                    </td>
                                    <td>
                                        <a href="/Guide/Create?modelId=@Model.Guide.ModelID">
                                            <img src="/Content/Images/Add.ico" width="13px" height="13px" title="Thêm bài mới" /></a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="/Content/Images/preferences-system.ico" width="20px" height="20px" />
                                    </td>
                                    <td style="padding: 0px">
                                        <a class="titleLink" href="/Question/Index?deviceId=@Model.Guide.Model.Device.Id&manufacturerId=@Model.Guide.Model.Manufacturer.Id&modelId=@Model.Guide.ModelID" title="Xem tất cả các câu hỏi cho @Model.Guide.Model.Device.Name @Model.Guide.Model.Manufacturer.Name @Model.Guide.Model.Name">@ViewBag.NumberOfQuestions
                                            câu hỏi</a>
                                    </td>
                                    <td>
                                        <a href="/Question/Create?modelId=@Model.Guide.ModelID">
                                            <img src="/Content/Images/Add.ico" width="13px" height="13px" title="Thêm câu hỏi mới" /></a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <br />
                <div class="roundedField" style="background-color: gainsboro; padding-top: 10px;
                    padding-bottom: 10px">
                    <center>
                        @using (Html.BeginForm("Create", "Guide", FormMethod.Get))
                        {
                            <input type="submit" id="createNewGuideBtn" class="colorButton" value="Tạo Hướng Dẫn Mới"
                                style="height: 30px; width: 160px" />
                        }
                        <br />
                        @using (Html.BeginForm("Create", "Question", FormMethod.Get))
                        {
                            <input type="submit" id="createNewQuestionBtn" class="colorButton" value="Tạo Câu Hỏi Mới"
                                style="height: 30px; width: 160px" />
                        }
                    </center>
                </div>
                <br />
                <a href="http://hieuvetraitim.org/index.php">
                    <img src="/Content/Images/QuangCao.jpg" width="100%" /></a>
                <br /><br/>
                <table class="contentBox" width="100%">
                    <tr>
                        <th class="boxTitle">
                            Bài Cũ Hơn
                        </th>
                    </tr>
                    <tr>
                        <td style="font-size: 13px; background-color: #EFF8FB">
                            @foreach (var guide in Model.TopOlderGuides)
                            {
                                <div style="padding: 5px">
                                    <a class="suggestLink" href="/Guide/Details/@guide.Id">@guide.Title</a></div>
                            }
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>



}
